package com.mmlc.meimei.lichengkongjian.home;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.mmlc.inter.InterAdapter;
import com.mmlc.meimei.lichengkongjian.R;
import com.mmlc.network.responsebean.GoodsListResponseBean;
import com.mmlc.utils.ViewUtils;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/7/22.
 */
public class ResultAdapter extends InterAdapter<GoodsListResponseBean.DataBean.GoodslistBean> {
    public ResultAdapter(Context context, ArrayList<GoodsListResponseBean.DataBean.GoodslistBean> datas) {
        super(context, datas);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = LayoutInflater.from(context).inflate(R.layout.item_result, parent, false);
        }
        TextView tv_content = ViewUtils.ViewHolder.get(convertView, R.id.tv_content);

        tv_content.setText(datas.get(position).getGoods_name());

        return convertView;
    }
}
